package utils;

import java.io.Serializable;
import java.lang.reflect.InvocationTargetException;

/**
 * Created by lincl on 2018/12/6.
 */
public class ConfigBean implements Serializable {
    private static final long serialVersionUID = 1322512161616324925L;

    private String name;
    private String userName;
    private String password;
    private String svnPath;
    private String localPath;

    private String classesPath;
    private String outPath;

    public void setProperty(String text) throws NoSuchMethodException, InvocationTargetException, IllegalAccessException {
        String[] s = text.split("=");
        String key = s[0].trim();
        String method = "set" + key.substring(0, 1).toUpperCase() + key.substring(1);
        this.getClass().getMethod(method, String.class).invoke(this, s[1].trim());
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getSvnPath() {
        return svnPath;
    }

    public void setSvnPath(String svnPath) {
        this.svnPath = svnPath;
    }

    public String getLocalPath() {
        return localPath;
    }

    public void setLocalPath(String localPath) {
        this.localPath = localPath;
    }

    public String getClassesPath() {
        return classesPath;
    }

    public void setClassesPath(String classesPath) {
        this.classesPath = classesPath;
    }

    public String getOutPath() {
        return outPath;
    }

    public void setOutPath(String outPath) {
        this.outPath = outPath;
    }
}
